package com.zhou.framework.model;

import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @author lang.zhou
 * @date 2022/4/28 13:32
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class PageResult<T> extends HttpResult {
    private Long total = 0L;
    private List<T> list = new ArrayList<>(0);
    private PageParam pageInfo ;

    public PageResult(PageParam pageInfo) {
        this.pageInfo = pageInfo;
    }
    public PageResult(Map<String,Object> map) {
        pageInfo = new PageParam(map);
    }

    public PageResult(int pageNum,int pageSize) {
        this.pageInfo = new PageParam(pageNum,pageSize);
    }
}
